<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEnterpriseProductPictureTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('enterprise_product_picture', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('id');
            // 对应的产品id
            $table->integer('product_id')->unsigned();
            // 图片简介
            $table->string('synopsis',255);
            // 产品图片url
            $table->string('picture',255);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('enterprise_product_picture');
    }
}
